package com.example.teliaCellInfo;

import android.view.View;
import android.widget.AdapterView;
import android.widget.Spinner;
import android.widget.AdapterView.OnItemSelectedListener;

public class EmailSpinner {

	private Spinner spinnerEmail;

	public String getEmail(View rootView2) {
		spinnerEmail = (Spinner) rootView2.findViewById(R.id.spinnerEmail);
		
		spinnerEmail
				.setOnItemSelectedListener(new CustomOnItemSelectedListener());
		
		return spinnerEmail.getSelectedItem().toString();
	}
	

	private class CustomOnItemSelectedListener implements
			OnItemSelectedListener {
		public void onItemSelected(AdapterView<?> parent, View view, int pos,
				long id) {
			// Toast.makeText(activity,
			// parent.getItemAtPosition(pos).toString(),
			// Toast.LENGTH_SHORT).show();
		}

		@Override
		public void onNothingSelected(AdapterView<?> arg0) {

		}

	}
}